<?php

class Admin_MenuController extends ApiController {

	const Menu = [
		[
			'id' => 1,
			'title' => '设置组1',
			'icon' => 'layui-icon layui-icon-console',
			'type' => 0,
			'href' => '',
			'children' => [
				[
					'id' => 10,
					'title' => '首页',
					'icon' => 'layui-icon layui-icon-console',
					'type' => 1,
					'openType' => '_iframe',
					'href' => 'admin_index/console',
				],
				[
					'id' => 11,
					'title' => '模块1.1',
					'icon' => 'layui-icon layui-icon-console',
					'type' => 1,
					'openType' => '_iframe',
					'href' => 'admin_index/sample',
				],
				[
					'id' => 12,
					'title' => '模块1.2',
					'icon' => 'layui-icon layui-icon-console',
					'type' => 1,
					'openType' => '_iframe',
					'href' => 'admin_index/sample',
				],
			],
		],
		[
			'id' => 2,
			'title' => '设置组2',
			'icon' => 'layui-icon layui-icon-set',
			'type' => 0,
			'href' => '',
			'children' => [
				[
					'id' => 21,
					'title' => '模块2.1',
					'icon' => 'layui-icon layui-icon-console',
					'type' => 1,
					'openType' => '_iframe',
					'href' => 'admin_index/sample',
				],
			],
		],
	];

	// 管理端菜单配置
	public function indexAction() {
		$this->successMessage('', self::Menu);
	}

}